package org.mozhu.mboot.core.web.resource;

import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;

import java.util.List;

public class CombineWebResourceConfigurer implements WebResourceConfigurer {
    private List<WebResourceConfigurer> webResourceConfigurers;

    public CombineWebResourceConfigurer(List<WebResourceConfigurer> webResourceConfigurers) {
        this.webResourceConfigurers = webResourceConfigurers;
    }

    @Override
    public void addResourceHandler(ResourceHandlerRegistry registry) {
        for (WebResourceConfigurer webResourceConfigurer : webResourceConfigurers) {
            webResourceConfigurer.addResourceHandler(registry);
        }
    }
}
